# $Id: Makefile,v 1.4 2005/04/08 20:59:01 jjo Exp $

CFLAGSI="-I./headers/"
LDFLAGSI="-L./lib/"
COMPILER="gcc"
LIBDEPYTHONIZE_C="./lib/libdepythonize_c.a"
MODULE_NAME="depythonize"
# all: lib

pythonlib:
# 	CFLAGSI=$(CFLAGSI) LDFLAGSI=$(LDFLAGSI) python setup.py build
# 	CFLAGSI=-I./headers/ LDFLAGSI=-L./lib/ python setup.py build
	$(COMPILER) $(CFLAGSI) $(LDFLAGSI) -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 \
	-c $(MODULE_NAME).c -o build/$(MODULE_NAME).o
	$(COMPILER) $(CFLAGSI) $(LDFLAGSI) -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions \
	-ldepythonize_c \
	build/$(MODULE_NAME).o \
	-o build/$(MODULE_NAME).so

clean:
	rm build/*.o
 